import request from '@/utils/request'

// 打开视频
export function openVideo(data) {
  return request({
    url: '/assess/testVideo/selectAll',
    method: 'post',
    data
  })
}

// 新建文件夹
export function newFolder(data) {
  return request({
    url: '/assess/folderManagement/createFolder',
    method: 'post',
    data
  })
}

// 获取文件夹
export function getFolder(data) {
  return request({
    url: '/assess/folderManagement/getFoldersByTaskIdAndUserId',
    method: 'post',
    data
  })
}

// 获取文件夹及文件
export function getFolderAndFile(data) {
  return request({
    url: '/assess/folderManagement/getFileByTaskIdAndUserId',
    method: 'post',
    data
  })
}

// 保存文件
export function save(data) {
  return request({
    url: '/assess/folderManagement/saveFile',
    method: 'post',
    data
  })
}

// 删除文件夹或文件
export function deleteFile(data) {
  return request({
    url: '/assess/folderManagement/DeleteFoldersByTaskIdAndUserId',
    method: 'post',
    data
  })
}

// 获取测试记录
export function getFlyRecord(data) {
  return request({
    url: '/fly/parent/list',
    method: 'post',
    data
  })
}

// 新增测试记录
export function addFlyRecord(id) {
  return request({
    url: `/fly/parent/add/${id}`,
    method: 'get'
  })
}